package com.lykj.llw.box.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.lykj.llw.box.R
import com.lykj.llw.box.data.bean.response.IntegralRecordListResponse

/**
 * ================================================
 * 积分记录适配器
 * ================================================
 *
 * @author gosha
 * @date 2023/10/18-12:01
 */
class IntegralRecordAdapter :
    BaseQuickAdapter<IntegralRecordListResponse.DataDTO.RowsDTO, BaseViewHolder>(R.layout.item_integral_record) {
    override fun convert(holder: BaseViewHolder, item: IntegralRecordListResponse.DataDTO.RowsDTO) {
        holder.setText(R.id.tv_title, "${item.integral.toInt()}积分")
        holder.setText(R.id.tv_time, "${item.createTime}")
        holder.setText(R.id.tv_amount, "${item.ptb}币")
    }
}